package com.demo.component;

import com.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2023-02-08
 * Time: 16:42
 */
@Component
public class UserComponent {

    @Autowired  //自动装配
    private UserService userService;

    public void doComponent() {
        System.out.println("Hi,Component~");
        userService.doService();
    }
}
